package com.jiazhong.Final.Final02;

public class Final02 {
    public static void main(String[] args) {
        CC cc=new CC();
        new EE().cal();
    }
}
class AA{
    public final double TAX_RATE=0.01;//1.定义时赋值
    public final double TAX_RATE02;//2.构造器中赋值
    public final double TAX_TATE03;//3.代码块中赋值

    public AA() {
        TAX_RATE02 = 0.02;
    }
    {
        TAX_TATE03=0.03;
    }
}
class BB{//有static修饰时，不能在构造器中赋值
    public static final double TAX_RATE=0.04;//1.定义时赋值
    public static final double TAX_RATE02;//2.代码块中赋值
    static {
        TAX_RATE02=0.05;
    }
}
final class CC{}
class DD{
    public final void cal(){
        System.out.println("cal（）方法");
    }
}
class EE extends DD{}
